package com.tiny.work.btrace.map;

import com.sun.btrace.AnyType;
import com.sun.btrace.annotations.BTrace;
import com.sun.btrace.annotations.Kind;
import com.sun.btrace.annotations.Location;
import com.sun.btrace.annotations.OnMethod;

import java.lang.reflect.Field;

import static com.sun.btrace.BTraceUtils.Reflective.get;
import static com.sun.btrace.BTraceUtils.field;
import static com.sun.btrace.BTraceUtils.println;
import static com.sun.btrace.BTraceUtils.str;

@BTrace
public class TraceBlacelist {

    @OnMethod(
            clazz = "com.fangdd.customer.web.controller.internalservice.BlacklistController",
            method = "washupSuspectBlacklist",
            location = @Location(value = Kind.ENTRY)
    )
    public static void trace_test(AnyType arga[]){
        println(arga.length);
        AnyType anyType = arga[0];
        Field pointListFiled = field("com.fangdd.customer.web.controller.internalservice.WashUpBlackRequest","washUpBlackResults");
        Object o = get(pointListFiled, anyType);
        println(str(o));
        println();
    }
}
